package com.kaishengit.service;

import java.util.List;

import com.kaishengit.dao.ProductDao;
import com.kaishengit.entity.Product;

public class ProductService {
	ProductDao dao=new ProductDao(); 
	public List<Product> findAll(){
		return dao.findAll();
	}
	public void del(int id){
		
		dao.del(id);
	}
	public void save(Product pro) {
		System.out.println("service de save");
		dao.save(pro.getProdname(),pro.getPrice());
		
	}
	public void update(Product pro){
		dao.update(pro);
	}
	public Product findById(int id) {
		return dao.findById(id);
		
	}

}
